package com.cloudfun.campusshare.common.model.vo;

import com.cloudfun.campusshare.common.constant.DevicePlatform;
import com.cloudfun.campusshare.common.constant.ProductType;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;

/**
 * @author linyangping
 * @Title: 设备绑定vo
 * @date 2019/11/6 下午2:27
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "设备绑定信息")
public class DeviceVO {

    @ApiModelProperty(value = "设备名称")
    @NotEmpty(message = "设备名称不能为空")
    @Length(max = 20, message = "名称过长，限制20个字")
    private String deviceName;

    @ApiModelProperty(value = "设备编号")
    @NotEmpty(message = "设备编号不能为空")
    @Length(max = 20, message = "设备编号过长，限制20个字")
    private String deviceNumber;

    @ApiModelProperty(value = "设备所在场所")
    @NotEmpty(message = "设备所在场所不能为空")
    @Length(max = 20, message = "设备所在场所过长，限制20个字")
    private String devicePlace;

    @ApiModelProperty(value = "设备具体地址")
    @NotEmpty(message = "设备具体地址不能为空")
    @Length(max = 100, message = "设备具体地址过长，限制100个字")
    private String address;

    @ApiModelProperty(value = "设备型号")
    @NotEmpty(message = "设备型号不能为空")
    @Length(max = 40, message = "设备型号过长，限制40个字")
    private String deviceType;

    @ApiModelProperty(value = "设备二维码")
    @NotEmpty(message = "设备二维码不能为空")
    @Length(max = 200, message = "设备二维码过长，限制200个字")
    private String qrCode;

    @ApiModelProperty(value = "设备识别码")
    @NotEmpty(message = "设备识别码不能为空")
    @Length(max = 40, message = "设备识别码过长，限制40个字")
    @JsonProperty("deviceId")
    private String imei;

    @ApiModelProperty(value = "机器Id")
    @NotEmpty(message = "机器Id不能为空")
    @Length(max = 40, message = "机器Id过长，限制40个字")
    @JsonProperty("machineId")
    private String machineNo;

    @ApiModelProperty(value = "所属平台")
    private DevicePlatform platform;

    @ApiModelProperty(value = "产品类型")
    private ProductType productType;

}
